Skip to main content

POST New Live Video

Overview


The table below provides key details about the POST method to create a new Live Video.

POST New Live Video
MethodPOST
URL or Endpoint/api/v1/projectId/live-videos
HeadersAuthorization
ParametersprojectId
Request BodyTitle, Description, ChannelId, PublishDate

The description of the URL parameter is as follows:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique Id of the project.

Request Body

The description of the body parameters is as follows:

Parameter NameMandatoryTypeDescription
TitleYesstringTitle of the live video.
DescriptionNostringDescription of live video.
ChannelIdYesstringUnique identifier of the channel.
PublishDateNostringIndicates the date and time when the live video is created.

Response

{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "{videoId}",
"id": "{videoId}",
"name": null,
"title": "{title}",
"description": "{description}",
"playbackUrl": "https://cdn.vpplayer.tech/{projectId}/hub/{hub}/index.m3u8",
"thumbnail": "https://cdn.vpplayer.tech/{projectId}/images/{image}/live-thumbnail.jpg",
"channelPublicId": "{channelId}",
"channelName": "{channelName}",
"channelTitle": "{channelTitle}",
"liveStatus": null,
"author": "{Author}",
"publishDate": "2024-05-23T10:00:00Z",
"publishEndDate": "2024-07-29T11:22:59.819Z",
"canCutAndPublish": true,
"canStopAndCut": true
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false.
errorsarray[]Indicates if there was an error.
messagesarray[]Returns the response message from back-end.
resultarray[Object]Returns the response object.
publicIdstringReturns the public identifier for the live video
idstringReturns the identifier of the live video
namestringReturns a guid that is randomly generated
titlestringReturns title of live video
descriptionstringReturns description of live video
playbackUrlstringReturns a file URL where the livestream can be accessed for playback
thumbnailstringReturns the URL file for live video's thumbnail
channelPublicIdstringIndicates the unique identifier of channel that is related with live video
channelNamestringIndicates the name of the channel
channelTitlestringReturns title of the channel
liveStatusstringReturns current status of live video
authorstringReturns the author of the live video
publishDatestring($date-time)Returns date and time when the video was created
publishEndDatestring($date-time)The date and time when the publication of the video is set to end.
canCutAndPublishhboolReturns a value indicating if the video can be cut and published
canStopAndCutboolReturns a value indicating if the video can be stopped and cut
resultInfostringReturns extra information about the result.
statusCodeinteger($int32)Returns the HTTP Status Code.

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed